function efficiency_load_exp()
close all;
clc;

%% Hard-charging

% figure;
% cc=hsv(4);
% marker={'x-'; 'o-';'^-';'*-'};
% 
% M1 = csvread('./data/hard_charging/SC_40V_350k_long.dat',1,0);
% efficiency=M1(2:end,7);
% load=M1(2:end,4);
% plot(load,efficiency,marker{1},'color',cc(1,:),'LineWidth',0.75);
% hold all;
% 
% M2 = csvread('./data/hard_charging/SC_40V_350k_short.dat',1,0);
% efficiency=M2(2:end,7);
% load=M2(2:end,4);
% plot(load,efficiency,marker{2},'color',cc(2,:),'LineWidth',0.75);
% 
% M3 = csvread('./data/hard_charging/SC_40V_350k_no.dat',1,0);
% efficiency=M3(2:end,7);
% load=M3(2:end,4);
% plot(load,efficiency,marker{3},'color',cc(3,:),'LineWidth',0.75);
% 
% M4 = csvread('./data/hard_charging/SC_40V_350k_no2.dat',1,0);
% efficiency=M4(2:end,7);
% load=M4(2:end,4);
% plot(load,efficiency,marker{3},'color',cc(3,:),'LineWidth',0.75);
% legendInfo = {'350k long','350k short','350k no','350k no 2'};
% xlabel('Load current (A)');
% ylabel('Efficiency');
% legend(legendInfo,'Location','SouthEast');
% grid on;
% ylim([0.8 1]);
%% Soft-charging 1

% figure;
% cc=hsv(3);
% marker={'x-'; 'o-';'^-';'*-'};
% 
% M1 = csvread('./exp/soft_charging_1/SC_50k_40V_no.dat',1,0);
% efficiency=M1(2:end,7);
% load=M1(2:end,4);
% plot(load,efficiency,marker{1},'color',cc(1,:),'LineWidth',0.75);
% hold all;
% M2 = csvread('./exp/soft_charging_1/SC_50k_40V_short.dat',1,0);
% efficiency=M2(2:end,7);
% load=M2(2:end,4);
% plot(load,efficiency,marker{2},'color',cc(2,:),'LineWidth',0.75);
% M3 = csvread('./exp/soft_charging_1/SC_250k_40V_no.dat',1,0);
% efficiency=M3(2:end,7);
% load=M3(2:end,4);
% plot(load,efficiency,marker{3},'color',cc(3,:),'LineWidth',0.75);
% legendInfo = {'50k 40V no','50k 40V short','250k 40V no'};
% 
% xlabel('Load current (A)');
% ylabel('Efficiency');
% legend(legendInfo,'Location','SouthEast');
% grid on;
% ylim([0.8 1]);
%% Split-phase
figure;
cc=hsv(5);
marker={'x-'; 'o-';'^-';'*-'};

M1 = csvread('./data/split_phase/SC_50k_18_40V.dat',1,0);
efficiency=M1(2:end,7);
load=M1(2:end,4);
plot(load,efficiency,marker{1},'color',cc(1,:),'LineWidth',0.75);
legendInfo{1} = {'50k 40V split 18'};
hold on;

M1 = csvread('./data/split_phase/SC_50k_17_40V.dat',1,0);
efficiency=M1(2:end,7);
load=M1(2:end,4);
plot(load,efficiency,marker{2},'color',cc(2,:),'LineWidth',0.75);
legendInfo{2} = {'50k 40V split 17'};

M2 = csvread('./data/split_phase/SC_250k_17_40V.dat',1,0);
efficiency=M2(2:end,7);
load=M2(2:end,4);
plot(load,efficiency,marker{3},'color',cc(3,:),'LineWidth',0.75);
legendInfo{3} = {'250k 40V split'};

M1 = csvread('./data/split_phase/SC_100k_9_40V.dat',1,0);
efficiency=M1(2:end,7);
load=M1(2:end,4);
plot(load,efficiency,marker{2},'color',cc(2,:),'LineWidth',0.75);
legendInfo{4} = {'100k 40V split 9'};

xlabel('Load current (A)');
ylabel('Efficiency');
legend(legendInfo,'Location','SouthEast');
grid on;
ylim([0.8 1]);
%% Split-phase different voltage
% figure
% 
% Vin=[40 55]
% for i=1:length(Vin)
%     sprintf('./exp/split_phase/SC_50k_18_%iV.dat',Vin(i))
%     M = csvread(sprintf('./exp/split_phase/SC_50k_18_%iV.dat',Vin(i)),1,0);
%     efficiency=M(2:end,7);
%     load=M(2:end,4);
%     plot(load,efficiency,marker{i},'color',cc(i,:),'LineWidth',0.75);
%     hold all;
%     legendInfo{i} = sprintf('$V_{in}$=%i V',Vin(i));
% 
% end
% 
% xlabel('Load current (A)');
% ylabel('Efficiency');
% legend(legendInfo,'Location','SouthEast');
% grid on;
% ylim([0.8 1]);

%% Digest 


%%
% xlabel('Load current (A)');
% ylabel('Efficiency');
% legend(legendInfo,'Location','SouthEast');
% grid on;
% ylim([65 100]);
% xlim([0 3.1]);

% set(gcf, 'Position', [200 200 450 300])
% set(gcf,'PaperPositionMode','auto')
% print('-depsc2', '../Paper/images/efficiency_unregulated_exp');
% matlab2tikz( '../Paper/images/efficiency_unregulated_exp.tikz',  'height', '\figureheight', 'width', '\figurewidth','showInfo', false);
